<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>背景颜色和透明度如何设置</title>
    <style>
        div {
            height: 400px;
            /*背景颜色设置*/
            /*background-color: pink;*/
            /*背景透明度设置*/
            background-color: rgba(1,1,1,0.2);
        }
    </style>
</head>
<body>
<div>

</div>
</body>
</html>